package com.swak.corpwx;

import java.util.concurrent.CompletableFuture;

import com.swak.corpwx.kf.CpKfAccountAdd;
import com.swak.corpwx.kf.CpKfAccountAddResp;
import com.swak.corpwx.kf.CpKfAccountDel;
import com.swak.corpwx.kf.CpKfAccountDelResp;
import com.swak.corpwx.kf.CpKfAccountLink;
import com.swak.corpwx.kf.CpKfAccountLinkResp;
import com.swak.corpwx.kf.CpKfAccountUpdate;
import com.swak.corpwx.kf.CpKfAccountUpdateResp;
import com.swak.corpwx.kf.CpKfMsgList;
import com.swak.corpwx.kf.CpKfMsgListResp;
import com.swak.corpwx.kf.CpKfServiceStateGet;
import com.swak.corpwx.kf.CpKfServiceStateGetResp;
import com.swak.corpwx.kf.CpKfServiceStateTrans;
import com.swak.corpwx.kf.CpKfServiceStateTransResp;
import com.swak.wechat.WechatConfig;

/**
 * 客服接口
 * 
 * @author 618lf
 */
public interface CpKfService {

	/**
	 * 设置客服
	 * 
	 * @param add
	 * @return
	 */
	CompletableFuture<CpKfAccountAddResp> addAccount(WechatConfig app, CpKfAccountAdd add);

	/**
	 * 修改客服
	 * 
	 * @param update
	 * @return
	 */
	CompletableFuture<CpKfAccountUpdateResp> updateAccount(WechatConfig app, CpKfAccountUpdate update);

	/**
	 * 删除客服
	 * 
	 * @param del
	 * @return
	 */
	CompletableFuture<CpKfAccountDelResp> delAccount(WechatConfig app, CpKfAccountDel del);

	/**
	 * 客服的聊天连接
	 * 
	 * @param del
	 * @return
	 */
	CompletableFuture<CpKfAccountLinkResp> accountLink(WechatConfig app, CpKfAccountLink link);

	/**
	 * 分配客服会话
	 * 
	 * @param app
	 * @param trans
	 * @return
	 */
	CompletableFuture<CpKfServiceStateTransResp> transServiceState(WechatConfig app, CpKfServiceStateTrans trans);

	/**
	 * 获取会话状态
	 * 
	 * @param app
	 * @param trans
	 * @return
	 */
	CompletableFuture<CpKfServiceStateGetResp> getServiceState(WechatConfig app, CpKfServiceStateGet get);

	/**
	 * 同步会话消息
	 * 
	 * @param app
	 * @param query
	 * @return
	 */
	CompletableFuture<CpKfMsgListResp> syncMsg(WechatConfig app, CpKfMsgList query);
}